<template>
    <div>
        <resume-title title="全部简历" time="45"></resume-title>
        <filtrate-resume v-if="activeIndex == 1" @getJobId="getJobId" :job-list="jobList"></filtrate-resume>

        <job-list :nowPage="nowPage" :type="0" :total="total" :state="1" v-model="activeIndex" :platform="platform"
                  v-if="activeIndex == 0" @getTotal="getTotal" @onJobList="onJobList"></job-list>

        <personal-list v-if="activeIndex == 1" :nowPage="nowPage" :jobId="jobId" @getTotal="getTotal"
                       @getJobId="getJobId"></personal-list>
        <no-resume v-if="false"></no-resume>
        <resume-pagination :total="total" @hasPage="getPage"></resume-pagination>
    </div>
</template>

<script>
  import noResume from './no-resume'
  import resumeTitle from './resume-title'
  import filtrateResume from './filtrate-resume'
  import jobList from './job-list'
  import personalList from './personal-list'
  import resumePagination from './resume-pagination'

  export default {
    data() {
      return {
        platform: true,
        activeIndex: '0',
        total: 10,
        nowPage: 1,
        jobId: 0,
        item: '',
        jobList: []
      }
    },
    methods: {
      getPage(val) {
        console.log(val)
        this.nowPage = val
      },
      getTotal(val) {
        this.total = val
      },
      getJobId(val) {
        this.jobId = val
      },
      onJobList(list) {
        this.jobList = list
      }
    },
    components: {
      noResume,
      resumeTitle,
      filtrateResume,
      jobList,
      personalList,
      resumePagination
    }
  }
</script>

<style lang="scss" scoped>
</style>
